package com.qijian.maindata.domain.query;

import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.util.Date;
import java.util.List;


/**
 * 外协比价对象 查询条件类
 *
 * @author qijian
 * @date 2022-09-13
 */

@Data
@ToString
@TableName("main_out_compare")
public class OutCompareQuery {

    @WhereType(filed = "id")
    private Long id;
    @WhereType(filed = "id", type = WhereTypeEnum.IN)
    private List<Long> ids;
    @WhereType(filed = "number", type = WhereTypeEnum.LIKE)
    private String number;
    @WhereType(filed = "source_id")
    private Long sourceId;
    @WhereType(filed = "compare_date",type = WhereTypeEnum.BETWEEN)
    private Date[] compareDate;
    @WhereType(filed = "compare_date", type = WhereTypeEnum.BETWEEN)
    private String[] compareDateMonth;
    @WhereType(filed = "compare_user_id")
    private Long compareUserId;
    @WhereType(filed = "compare_user_name")
    private String compareUserName;
    @WhereType(filed = "approval_by")
    private String approvalBy;
    @WhereType(filed = "approval_time",type = WhereTypeEnum.BETWEEN)
    private Date[] approvalTime;
    @WhereType(filed = "approval_status")
    private String approvalStatus;
    @WhereType(filed = "remark")
    private String remark;
    @WhereType(filed = "is_default", tableName = "main_out_compare_item_detail")
    private Boolean isDefault;

    @WhereType(func = "NOT EXISTS (SELECT 1 FROM main_adjust_order WHERE source_id = main_out_compare.id)")
    private Boolean isAdjustOrder;

    @WhereType(filed = "org_name", type = WhereTypeEnum.IN)
    private List<String> orgNames;
}
